<?php
require_once ROOT_PATH.'mobiapi/request/base.req.php';

class MobiRequest extends BaseRequest
{
	var $email;
	var $name;
	var $source_id;
	var $password;
	
	var $image;
	var $gender;
	var $desc;
	var $city;
	
	function __construct($request)
	{
		parent::__construct($request);
		
		$this->email = isset($request['email']) ? $request['email'] : '';
		$this->name = isset($request['name']) ? $request['name'] : '';
		$this->source_id = isset($request['source_id']) ? $request['source_id'] : '';
		$this->password = isset($request['password']) ? $request['password'] : '';
		
		$this->image = isset($request['image']) ? $request['image'] : '';
		$this->gender = isset($request['gender']) ? $request['gender'] : '';
		$this->desc = isset($request['desc']) ? $request['desc'] : '';
		$this->city = isset($request['city']) ? $request['city'] : '';
	}
	
	function is_valid()
	{
		return (($this->email != '' || $this->source_id) && $this->password != '');
	}
}